package fileIO;

import java.util.Calendar;

public class Printf {
	public static void main(String[] args) {
		// test();
		test2();

	}

	private static void test2() {
		Calendar c = Calendar.getInstance();
		String s1 = String.format("Duke's Birthday: %1$tm %1$te,%1$tY", c);
		String s2 = String.format("Duke's Birthday: %1$tm %<te,%<tY", c);
		System.out.println(s1+'\n'+s2);
	}

	private static void test() {
		Calendar c = Calendar.getInstance();
		c.add(Calendar.MONTH, 1);
		String s = String.format("Duke's Birthday: %1$tm %1$te,%1$tY", c);
		System.out.println(s);
		System.out.printf("%1$tk:%1$tM:%1$tS,%1$tp%n", c);
		System.out.printf("%1$tB:%1$tA:%1$tC,%1$tj", c);
		System.out.printf("%n%1$tc", c);
	}
}
